home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / os2 / clone200.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1996-11-06  |  2KB  |  90 lines

  1. /*  Install Clone Cleaner Version 2.00
  2.     ----------------------------------------------------
  3.     INSTALL CLONE CLEANER
  4.     Leave Clone Cleaner Files in Currect Dir and
  5.     Create an Desktop Shadow of the .exe and .inf files
  6.     ----------------------------------------------------
  7.     Copyright (c) 1996
  8.     Edward J. March Jr.
  9.     1206 South Birch Drive
  10.     Mt. Prospect, IL 60056
  11. */
  12.  
  13. echo off
  14. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  15. Call SysLoadFuncs
  16. Call SysCls
  17.  
  18. /*
  19. //  Determine the Current path (from where install.cmd is running from)
  20. //  Perhaps from From a Floppy Disk such as A:\
  21. */
  22. parse source . . argv0 .
  23. temp = reverse(argv0)
  24. temp = substr(temp, pos('\', temp))
  25. Len = length(temp)
  26. If Len > 3 then Do
  27.     temp = substr(temp, 2)
  28. End
  29.  
  30. CurrentPath = reverse(temp)
  31. LastChar = Right(CurrentPath,1)
  32.  
  33. Say '       This Will Create a Desktop Folder that has shadows of the'
  34. Say '       ========================================================='
  35. Say ' '
  36. Say '       CloneCln.exe and CloneCln.Inf file from this directory.'
  37. Say '       ========================================================='
  38. Say 'This Dir is ' CurrentPath
  39. Say ' '
  40. Say 'Press "Y" To Continue, or any other key to stop,  Continue ?'
  41. Pull yesno
  42.  
  43. if yesno <> "Y" & yesno <> "y" Then Do
  44.     Say "!!! Cancel !!!"
  45.     Say "No Desktop Folder or shadows objects were created"
  46.     Say 'Press Any Key To Exit...'
  47.     SysGetKey()
  48.     Exit
  49. End
  50.  
  51. /*
  52. // SHADOW SEVERAL FILES FROM CurrentPath TO THE NEWLY CREATED FOLDER ON THE DESKTOP
  53. //EJM
  54. */
  55. FolderId = '<CloneCleaner200>'
  56.  
  57. Rc = SysCreateObject('WPFolder','Clone Cleaner','<WP_DESKTOP>' ,'OBJECTID='FolderId,'U')
  58. Rc = SysOpenObject(FolderId , 'ICON', 1);
  59.  
  60.     rc1 = SysCreateShadow( 'CloneCln.exe', FolderId )
  61.  
  62. Call ShadowTheFile 'CloneCln.Exe'
  63. Call ShadowTheFile 'CloneCln.Inf'
  64. Call ShadowTheFile 'ReadMe.Txt'
  65.  
  66. Say 'Press Any Key To Exit...'
  67. SysGetKey()
  68. Exit
  69.  
  70.  
  71. /*
  72. ** Make Shadow Of File into Desktop Folder
  73. */
  74. ShadowTheFile:
  75.     Arg Name
  76.     File = CurrentPath'\'Name
  77.     rc1 = SysCreateShadow( File, FolderId )
  78.  
  79.     if rc1 = 1 Then Do
  80.         Say 'Shadow of 'File 'Created OK'
  81.     End
  82.  
  83.     if rc1 <> 1 Then Do
  84.         Say '**** Error ' rc1 ' Shadowing 'File
  85.     End
  86. Return rc1
  87.  
  88.  
  89.  
  90.